<div class="clearfix">
	<div class="wrapper-md">
		<tabset class="tab-container">
			<tab ng-controller="PersonalApprovalCtrl" select="getList(1)">
				<tab-heading>
					待审批的
				</tab-heading>
				<div class="row panel" style="padding-top: 10px">
					<div class="col-md-12">
						<div class="table-responsive">
							<table st-table="displayListData" st-safe-src="listData" class="table">
								<thead class="table-header">
								<tr>
									<th width="15%" class="text-center font-15">审批名称</th>
									<th width="10%" class="text-center font-15">审批状态</th>
									<th width="10%" class="text-center font-15">类型</th>
									<th width="20%" class="text-center font-15">申请人</th>
									<th width="15%" class="text-center font-15">修改时间</th>
									<th width="20%" class="text-center font-15">操作</th>
								</tr>
								<tr>
									<th colspan="6">
										<input st-search placeholder="通过名称进行过滤" class="input-sm form-control" type="search"/>
									</th>
								</tr>
								</thead>
								<tbody>
								<tr ng-repeat="row in displayListData">
									<td width="15%" class="text-center font-15 detail-href text-overflow" style="max-width:169px" ng-bind="row.name" ng-click="detail($event,row)"></td>
									<td width="10%" class="text-center font-15 text-overflow" style="max-width:112px">
										<div class="text-left" style="padding-left:18%;">
											<i class="status-dot-style" ng-class="{'APPROVED':'btn-success','REFUSED':'btn-danger','APPROVING':'btn-info','UNAPPLY':'btn-primary'}[row.status]"></i>
											<span class="status-span-style" title="{{row.status|cn:'applyStatus'}}" ng-bind="row.status|cn:'applyStatus'"></span>
										</div>
									</td>
									<td width="10%" class="text-center font-15 text-overflow" style="max-width:112px" ng-bind="row.catalog"></td>
									<td width="20%" class="text-center font-15 text-overflow" style="max-width:225px" ng-bind="row.applicantName"></td>
									<td width="15%" class="text-center font-15 text-overflow" style="max-width:170px" ng-bind="row.gmtModify"></td>
									<td width="20%" class="text-center font-15">
										<div class="btn-group dropdown table-operation" dropdown="">
											<a class="btn btn-info btn-addon" dropdown-toggle=""><i class="fa fa-reorder" ></i>操作</a>
											<ul class="dropdown-menu">
												<li ng-click="check(row.id)" ><a href="">审批</a></li>
											</ul>
										</div>
									</td>
								</tr>
								</tbody>
								<tfoot>
								<tr>
									<td colspan="2" class="text-left">
										<div>每页{{itemsByPage}}条，共{{total}}条</div>
									</td>
									<td colspan="4" class="text-right">
										<div st-pagination="" st-items-by-page="itemsByPage" st-displayed-pages="7" class="no-margin"></div>
									</td>
								</tr>
								</tfoot>
							</table>
						</div>
						<div ng-if="showDetail&&detailData.type=='VMWARE'" ng-hide-detail="" class="animated tab-detail" ng-class="{true:'bounceInRight',false:'bounceOutRight'}[isActive]">
							<div class="col-md-12">
								<div class="panel panel-default" style="padding:0;">
									<div class="panel-heading font-bold">
										<span class="p-l-6">虚机详情</span>
									</div>
									<div class="panel-body pmb-block" style="border:none;">
										<div class="form-horizontal">
											<div class="">
												<div class="pmbb-header">
													<h5 class="console-title">基本信息</h5>
												</div>
												<div class="pmbb-body p-l-30">
													<div class="form-group">
														<div class="col-lg-4">
															<dl class="dl-horizontal">
																<dt>虚机名称：</dt>
																<dd ng-bind="detailData.name"></dd>
															</dl>
														</div>
														<div class="col-lg-4">
															<dl class="dl-horizontal">
																<dt>虚机模板：</dt>
																<dd ng-bind="detailData.template"></dd>
															</dl>
														</div>
														<div class="col-lg-4">
															<dl class="dl-horizontal">
																<dt>目标主机：</dt>
																<dd ng-bind="detailData.hostname"></dd>
															</dl>
														</div>
													</div>
													<div class="form-group">
														<div class="col-lg-4">
															<dl class="dl-horizontal">
																<dt>数据存储：</dt>
																<dd ng-bind="detailData.datastore"></dd>
															</dl>
														</div>
														<div class="col-lg-4">
															<dl class="dl-horizontal">
																<dt>cpu大小：</dt>
																<dd>{{detailData.cpu}} 核</dd>
															</dl>
														</div>
														<div class="col-lg-4">
															<dl class="dl-horizontal">
																<dt>内存大小：</dt>
																<dd>{{detailData.memory}} MB</dd>
															</dl>
														</div>
													</div>
													<div class="form-group">
														<div class="col-lg-4">
															<dl class="dl-horizontal">
																<dt>磁盘大小：</dt>
																<dd>{{detailData.disk}} G</dd>
															</dl>
														</div>
													</div>
												</div>
											</div>
										</div>
										<div class="detail-go-back" ng-click="goBack()"><i class="fa fa-angle-right"></i></div>
									</div>
								</div>
							</div>
						</div>
						<div ng-if="showDetail&&detailData.type=='OPENSTACK'" ng-hide-detail="" class="animated tab-detail" ng-class="{true:'bounceInRight',false:'bounceOutRight'}[isActive]">
							<div class="col-md-12">
								<div class="panel panel-default" style="padding:0;">
									<div class="panel-heading font-bold">
										<span class="p-l-6">虚机详情</span>
									</div>
									<div class="panel-body pmb-block" style="border:none;">
										<div class="form-horizontal">
											<form class="form-horizontal form-validation" name="addvmOpenstackForm">
												<div class="form-group">
													<div class="col-lg-12 margin-10" style="padding-right: 15px;padding-left: 10px;">
														<label class="col-lg-3 control-label">可用区域：</label>
														<div class="col-lg-9 control-input" style="width:calc(100% - 85px);padding:0;">
															<div class="region region-box" style="width:118px;" ng-class="{true:'region-active'}[row.isRegionActive]" ng-repeat="row in regionData">
																<span class="region-txt" ng-bind="row.name"></span>
															</div>
														</div>
													</div>
												</div>
												<div class="col-md-12 search-box m-b-md" style="float:none;">
													<div class="legend">平台选择</div>
													<div class="search-content1">
														<div class="form-group">
															<div class="col-lg-4">
																<label class="control-label">主机名称：</label>
																<div class="control-input width-74">
																	<input type="text" name="name" class="form-control input-sm" placeholder="主机名称" ng-model="updateData.name" disabled>
																</div>
															</div>
														</div>
													</div>
												</div>
												<div class="col-md-12 search-box m-b-md" style="float:none;">
													<div class="legend">基本信息</div>
													<div class="search-content1">
														<div class="form-group">
															<div class="col-lg-4">
																<label class="control-label">管理账号：</label>
																<div class="control-input width-74">
																	<input type="text" name="account" class="form-control input-sm" placeholder="账号" ng-model="account" maxlength="64" maxlength-error-message="最多输入64个字符" readonly/>
																</div>
															</div>
															<div class="col-lg-4">
																<label class="control-label">管理密码：</label>
																<div class="control-input width-74">
																	<input class="form-control input-sm" name="password" placeholder="密码" maxlength="18" ng-model="updateData.password" type="{{showPass_os?'text':'password'}}" readonly/>
																</div>
															</div>
														</div>
													</div>
												</div>
												<div class="col-md-12 search-box m-b-md" style="float:none;">
													<div class="legend">配置信息</div>
													<div class="search-content1">
														<div class="form-group">
															<div class="col-lg-4 input-style">
																<label class="control-label">镜像：</label>
																<div class="control-input width-74">
																	<select class="form-control input-sm" ng-model="updateData.imageId" ng-disabled="true">
																		<option value="">--请选择--</option>
																		<option ng-repeat="row in imageList" ng-selected="row.id==updateData.imageId" value="{{row.id}}" ng-bind="row.name"></option>
																	</select>
																</div>
															</div>
														</div>
														<div class="form-group">
															<div class="col-lg-12 margin-10" style="padding-right:15px;padding-left:10px;">
																<label class="col-lg-3 control-label">网络：</label>
																<div class="col-lg-9 control-input" style="width:calc(100% - 85px);padding:0;">
																	<div class="region region-box" style="width:110px;" ng-class="{true:'region-active'}[row.isNetworkActive]" ng-repeat="row in networkList">
																		<span class="region-txt" ng-bind="row.name"></span>
																	</div>
																</div>
															</div>
														</div>
													</div>
												</div>
												<div class="col-md-12 search-box" style="float:none;margin-bottom: 80px">
													<div class="legend">安全配置</div>
													<div class="search-content1">
														<div class="form-group">
															<div class="col-lg-12 input-style">
																<label class="control-label">配置实例：</label>
																<div class="control-input width-74">
																	<select class="form-control input-sm" ng-model="updateData.flavorId" disabled>
																		<option value="">--请选择--</option>
																		<option ng-repeat="row in sizeList" ng-selected="row.id==updateData.flavorId" value="{{row.id}}" ng-bind="row.name"></option>
																	</select>
																</div>
															</div>
															<div class="col-lg-6 input-style">
																<label class="col-lg-3 control-label line-height-54">CPU核数：</label>
																<div class="col-lg-9 control-input">
																	<rzslider rz-slider-model="slider.value" ng-if="sliderDone"
																	          rz-slider-options="slider.options"></rzslider>
																</div>
															</div>
															<div class="col-lg-6 input-style">
																<label class="col-lg-3 control-label line-height-54">内存大小：</label>
																<div class="col-lg-9 control-input">
																	<rzslider rz-slider-model="slider1.value" ng-if="sliderDone"
																	          rz-slider-options="slider1.options"></rzslider>
																</div>
															</div>
															<div class="col-lg-6 input-style">
																<label class="control-label">磁盘大小：</label>
																<div class="control-input width-74">
																	<input type="text" name="disk" class="form-control disk-input input-sm" placeholder="磁盘大小" ng-model="detailData.disk" readonly/>
																	<span class="sup" style="">G</span>
																</div>
															</div>
															<div class="col-lg-12 input-style">
																<label class="control-label">主机描述：</label>
																<div class="control-input width-74">
																	<textarea class="form-control input-sm" name="remark" placeholder="主机描述" ng-model="updateData.remark" maxlength="256" disabled></textarea>
																</div>
															</div>
														</div>
													</div>
												</div>
											</form>
										</div>
										<div class="detail-go-back" ng-click="goBack()"><i class="fa fa-angle-right"></i></div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</tab>
			<tab ng-controller="PersonalApprovaledCtrl" select="getList(1)">
				<tab-heading>
					已审批的
				</tab-heading>
				<div class="row panel" style="padding-top: 10px">
					<div class="col-md-12 search-box m-b-md">
						<div class="legend">查询条件</div>
						<div class="search-content">
							<div class="form-group">
								<label class="control-label">审批名称：</label>
								<input type="text" class="form-control" ng-model="name" placeholder="请输入审批名称"/>
							</div>
						</div>
						<div class="search-btn">
							<button class="btn btn-primary w-xs m-r" ng-click="search()"><i class="fa fa-search"></i> 查询</button>
							<button class="btn btn-success w-xs m-r" ng-click="reset()"><i class="fa fa-refresh"></i> 重置</button>
						</div>
					</div>
					<div class="row">
						<div class="col-md-12 table-responsive">
							<table class="table b-light m-b-xxs">
								<thead class="table-header">
								<tr>
									<th width="20%" class="text-center font-15">审批名称</th>
									<th width="20%" class="text-center font-15">审批状态</th>
									<th width="20%" class="text-center font-15">审批类型</th>
									<th width="20%" class="text-center font-15">申请人</th>
									<th width="20%" class="text-center font-15">修改时间</th>
								</tr>
								</thead>
								<tbody>
								<tr ng-repeat="(key,row) in listData">
									<td width="20%" class="text-center font-15 text-overflow detail-href" style="max-width:209px" ng-bind="row.name" ng-click="detail(row.id)"></td>
									<td width="20%" class="text-center font-15 text-overflow" style="max-width:209px">
										<div class="text-left" style="padding-left:18%;">
											<i class="status-dot-style" ng-class="{'APPROVED':'btn-success','REFUSED':'btn-danger','APPROVING':'btn-info','UNAPPLY':'btn-primary'}[row.status]"></i>
											<span class="status-span-style" title="{{row.status|cn:'applyStatus'}}" ng-bind="row.status|cn:'applyStatus'"></span>
										</div>
									</td>
									<td width="20%" class="text-center font-15 text-overflow" style="max-width:209px" ng-bind="row.catalog"></td>
									<td width="20%" class="text-center font-15 text-overflow" style="max-width:209px" ng-bind="row.applicantName"></td>
									<td width="20%" class="text-center font-15 text-overflow" style="max-width:209px" ng-bind="row.gmtModify"></td>
								</tr>
								</tbody>
							</table>
							<div class="clearfix">
								<div class="col-sm-6">
									<div class="paginationTables_info">共有<span ng-bind="totalPage"></span>条记录，每页显示<span ng-bind="param.rows"></span>条
									</div>
								</div>
								<div class="col-sm-6 text-right">
									<pagination boundary-links="true" total-items="totalPage" items-per-page="param.rows" max-size="10"
									            ng-model="param.page" ng-change="getList(param.page)" previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"></pagination>
								</div>
							</div>
						</div>
					</div>
				</div>
			</tab>
		</tabset>
	</div>
</div>